<template>
  <el-drawer title="2024年4月12日" :visible.sync="$attrs.visableIf" @close="handleCloseDialog" :close-on-click-modal="false" :close-on-press-escape="false" append-to-body size="1400px">
    <!--  近2周记录-->
    <div class="container-big">
      <div class="content-big">
        <div class="content-left">
          <ul class="nameList">
            <li>
              <img class="status-img" src="@/assets/images/quxiao.png" />
              <div class="flex flexbetween mb-8 title">
                <div class="name">测试批量拉群</div>
                <div class="status green">已完成</div>
              </div>
              <div class="flex flexbetween">
                <div class="number">已选：0好友 0群聊</div>
              </div>
              <div class="flex flexbetween userSet">
                <div class="item-li">
                  <div class="taskType">极速群发</div>
                  <div class="user-list">ID:3151082,主账号创建</div>
                </div>
                <div class="name-name">04-30 07:07</div>
              </div>
            </li>
          </ul>
        </div>

        <div class="content-right">
          <!--    查看详情-->
<!--          朋友圈-->
          <viewFriendDetail  v-if="taskType==1"></viewFriendDetail>
<!--          极速拉群\高级拉群-->
          <viewMassProduction v-if="taskType==2  || taskType==3"></viewMassProduction>
<!--          批量拉群-->
          <viewBatchGroup v-if="taskType==4" :rowItem="rowItem" :datakey="datakey"></viewBatchGroup>
        </div>
      </div>
      <deduplication v-if="showDeduplication" :visableIf.sync="showDeduplication"></deduplication>

    </div>
  </el-drawer>

</template>

<script>

import {listUser} from "@/api/system/user";

export default {
  name: "viewMgt",
  components: {
    'viewFriendDetail': () => import('./viewFriendDetail.vue'),
    'viewMassProduction': () => import('./viewMassProduction.vue'),
    'viewBatchGroup': () => import('./viewBatchGroup.vue'),
  },
  data() {
    return {
      taskType:'2', //任务类型1：朋友圈，2：高级群发3，极速群发 4，批量拉群
      rowItem: null,
      datakey: "",
      showDeduplication: false,
      showMassProduction:false,
      groupList: [
        {
          value: '0',
          label: '志新'
        }, {
          value: '1',
          label: '锐行'
        }
      ],
      userList: [
        {
          value: '0',
          label: '志新'
        }, {
          value: '1',
          label: '锐行'
        }
      ],
      taskStatusList: [
        {
          value: '1',
          label: '已完成'
        }, {
          value: '1',
          label: '未完成'
        }
      ],
      showAddBlackByUser: false,//按客户添加
      showAddEnterpriseBlack: false,//企业自动添加
      showSetClearBlack: false,//应用
      showSetChatBlack: false,//
      active: 0,
      visible: false,
      dateRange1: [],//添加时间
      dateRange2: [],//触发时间
      dialogType: 'add',
      showExportPage: false,//导出
      tableHeight: 600,
      tableDataList: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        userName2: null,
        pageSize: 10,
        id: null,//用户id
        userName1: null,

      },
      total: 8, // 表格的总条数
    }
  },
  created() {
  },
  methods: {
    /** 查询用户列表 */
    getList() {
      this.loading = true;
      listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
          this.tableDataList = response.rows;
          this.total = response.total;
          this.loading = false;
        }
      );
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.dateRange = [];
      this.resetForm("queryForm");
      this.queryParams.deptId = undefined;
      this.handleQuery();
    },
    handleCloseDialog() {
      this.$emit('update:visableIf', false);
      this.$emit("handleCloseFilter"); //关闭弹窗;
    },
  }
}
</script>

<style scoped lang="scss">
.tooltipContent {
  .h5 {
    font-size: 12px;
  }

  .list-big {
    display: flex;
    flex-wrap: wrap;

    span {
      height: 25px;
      display: flex;
      padding: 0px 5px;
      margin: 4px 4px 4px 0;
      color: rgba(0, 0, 0, .65);
      border: 1px dashed #eee;
    }
  }
}

.keywordList {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;

  .tips {
    color: #2d8cf0;
  }
}

.head-big {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  padding-bottom: 0px;
}

.container-big {
  display: flex;
  height: calc(100vh - 70px);
  margin: 12px;
  background: #fff;
  flex-direction: column;
  margin-bottom: 0px;
}

.formGroup {
  width: 100%;
  padding: 10px 20px;
  margin-bottom: 10px;

  .el-form {
    background: #fff;
    border-radius: 8px;
    margin-top: -1px;

    .el-button {
      margin-right: 10px;
    }

    .el-form-item {
      margin-bottom: 0px;

      ::v-deep .el-form-item__content {
        display: flex;

        .el-input {
          width: 150px;
        }
      }

      .right-big {
        border-radius: 4px;
        border: 1px solid #DCDFE6;
        padding-left: 11px;

        > span {
          color: #777;
          width: 89px;
          display: inline-block;
          white-space: nowrap;
        }

        .el-select {
          width: 138px;

          ::v-deep .el-input__inner {
            border: none;
          }
        }

        .el-input {
          width: 138px;

          ::v-deep .el-input__inner {
            border: none;
          }
        }

        ::v-deep .el-date-editor {
          border: none;
        }
      }

    }
  }
}

.content-big {
  display: flex;
  justify-content: center;
  height: calc(100% - 0px);
  width: 100%;
  border-top: 1px solid #eee;

  .content-left {
    width: 360px;
    padding: 10px;
    background: #f5f5f5;
    box-sizing: content-box;


  }

  .content-right {
    flex: 1;
  }
}


.nameList {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  font-size: 12px;
  li {
    width: 100%;
    display: block;
    padding: 12px 12px 10px 60px;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e9e9e9;
    cursor: pointer;
    color: rgba(0, 0, 0, .45);
    position: relative;
    .status-img {
      width: 44px;
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #f5f5f5;
      position: absolute;
      top: 10px;
      left: 10px;
    }
    .title {
      .right-dropdown {
        position: absolute;
        right: 5px;
        top: 15px;
      }
    }

    .name {
      color: #000;
      font-size: 14px;
      font-weight: bold;
    }

    .item-li {
      display: flex;
      align-items: center;
      justify-items: center;

      .taskType {
        font-size: 12px !important;
        color: rgba(0, 0, 0, .85);
        border-radius: 4px;
        margin: 0;
        background-color: rgb(217, 246, 234);
        padding: 5px 7px;
      }
      .user-list {
        font-size: 12px !important;
        color: rgba(0, 0, 0, .85);
        border-radius: 4px;
        margin: 0;
        border: 1px solid #e9e9e9;
        background: #fafafa;
        padding: 5px 7px;
        margin-left: 10px;
      }

    }

    .userSet {
      height: 30px;
      margin: 0px -15px;
      padding: 0px 15px;
      margin-top: 15px;
      margin-left: -60px;
    }

    .el-icon-more {
      position: absolute;
      right: 5px;
      color: #999;
      top: 0px;
      cursor: pointer;

    }

  }
}

.popover-big {
  .popover-title {
    i {
      font-size: 16px;
      color: #f8ac59;
      margin-right: 10px;
    }
  }

  .popover-btn {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
  }
}

.head-right {
  .el-dropdown {
    margin-right: 10px;
  }

  .el-button {
    i {
      margin-right: 5px;
    }
  }
}
.status {
  &.green {
    color: #1ab394;
  }
}
::v-deep .el-drawer__header {
  font-weight: bold;
  font-size: 16px;
}
</style>
